package cn.com.huzo.service.financial.impl;

import cn.com.huzo.model.entities.inventory.ReportInventoryDetailEntity;
import cn.com.huzo.repository.financial.ReportLateArrivalPoRepository;
import cn.com.huzo.repository.purchase.NotesPayabledLinesRepository;
import cn.com.huzo.service.financial.ReportLateArrivalPoManager;
import huzofw.service.impl.GenericManagerImpl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 晚到货订单数据一览表管理服务对象类实现。
 *
 * @author 吴旭
 */
@Service("ReportLateArrivalPoManager")
public class ReportLateArrivalPoManagerImpl extends GenericManagerImpl<ReportInventoryDetailEntity, HashMap>
        implements ReportLateArrivalPoManager {

    @Resource(name = "ReportLateArrivalPoRepository")
    private ReportLateArrivalPoRepository _dao;

    @Resource(name = "NotesPayabledLinesRepository")
    private NotesPayabledLinesRepository _dao_notes_payabled;

    /**
     * {@inheritDoc}
     *
     * @throws java.lang.Exception
     */
    @Override
    @Transactional
    public List<ReportInventoryDetailEntity> fetchReportData(Map<String, Object> criterion) throws Exception {
        return _dao.fetchReportData(criterion);
    }

    /**
     * 晚到货对账扣款单
     *
     * @param criterion
     * @return
     */
    @Override
    @Transactional
    public List<Map<String, Object>> fetchLateArrivalCutPayabledAmount(Map<String, Object> criterion) throws Exception {
        return _dao_notes_payabled.fetchLateArrivalCutPayabledAmount(criterion);
    }
}
